# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname="boxes"
pkgver=2.1.1
pkgrel=0
pkgdesc="Text mode box and comment drawing filter"
url="https://boxes.thomasjensen.com"
arch="all"
license="GPL-2.0"
makedepends="bison flex libunistring-dev pcre2-dev"
checkdepends="bash"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.zip::https://github.com/ascii-boxes/boxes/archive/v$pkgver.zip
fix-test.patch"
builddir="$srcdir/$pkgname-$pkgver"

build() {
	make -j1 GLOBALCONF=/etc/boxes-config
}

check() {
	make test
}

package() {
	install -D -m 644 doc/boxes.1 $pkgdir/usr/share/man/man1/boxes.1
	install -D -m 644 boxes-config $pkgdir/etc/boxes-config
	install -D -m 755 out/boxes $pkgdir/usr/bin/boxes
}

sha512sums="
0b3db6a070f3b5059538c4f0982ffcd36fc9c070e9f3e8a96677928671f628906c9fc3a7795d1eaaa9398d0caeec31d26910af3a7046a57aaf1ab7d9384114e0  boxes-2.1.1.zip
fafb487bc09228860f90621b9496f48e7e80e679269d99ee8227c7704a8822df56806898721397613b881d5aa777aa3ba21341bcb2869a39b4528e7f356f6aba  fix-test.patch
"
